The reader supports managing the reader configuration files, called profiles. The reader configuration is typically managed
The list of configurations supported by a reader can be obtained from API rm.Profile.getList. This function is supported only on FX7400.
The upload of configuration file can be performed using rm.Profile.exportToReader. The absolute file path of the source file must be specified. For example, C:\Profiles
The method rm.Profile.importFromReader helps to download the reader configuration file from the reader to the client i.e. the application where runs. The absolute path of the destination is required to download the file. For example, C:\Profiles. The name of profile to be downloaded can be obtained using rm.Profile.getList. Readers of XR-Series supports only one config file, i.e. Config.xml.
The method rm.Profile.delete deletes the profile from the reader. To activate a profile in the reader, the method rm.getProfile.setActive can be used.
This functionality is only supported in fixed reader not applicable to hand held readers.
try
{
ProfileInfo profileInfo = rm.Profile.getList();
String[] profileList = profileInfo.getProfileNames();
// import all profiles from reader
String profilePath = "d:\\profiles";
System.out.println("Profile List:");
for (int n = 0; n < profileList.length; n++) {
System.out.println(" " + profileList[n]);
rm.Profile.importFromReader(profileList[n], profilePath);
}
String profileName = profileList[profileList.length - 1];
System.out.println("Active Profile Index is " +
profileInfo.getActiveProfileIndex());
rm.Profile.setActive(profileList[0]);
// export a new profile to reader
rm.Profile.exportToReader(profileName, profilePath, false);
}
catch (OperationFailureException ex) {
System.out.println("Profile " +
ex.getStatusDescription());
}
catch (InvalidUsageException ex) {
}